<?php

header("content-type: application/json; charset-utf-8");

$data = [
    "id"=> isset($_POST["lastID"])  ? ($_POST["lastID"]+1): 0,
    "name"=> $_POST["name"],
    "sex"=> $_POST["sex"],
    "age"=> $_POST["age"],
    "time"=>date("Y-m-d H:i:s"),
];

echo json_encode([
    "code" => 0,
    "msg"=> "ok",
    "data" => $data,
]);
